A video is a sequence of images (also referred to as “frames”) that may be encoded and compressed by various methods including motion-JPEG (M-JPEG) or according to the H.264 standard. The terms ‘frame’ and ‘image’ are used throughout this specification interchangeably to describe a single image in an image sequence. An image is made up of visual elements such as pixels or 8×8 DCT (Discrete Cosine Transform) blocks as used in JPEG images in a motion-JPEG stream.
The purpose of creating a scene model is to enable foreground objects and static background of a scene viewed by a camera to be distinguished. The real world environment is dynamic. As a result, a scene model developed from the camera input image may vary over time. For example, the overall lighting in the scene captured by a camera can change, and for example objects can enter, move around or leave the scene.
A scene model maintained by a computer system may be subjected to large environmental changes that affect the captured image. Such rapid changes can occur, for example, due to lights turning on or off in a room. Since rapid lighting changes affect the captured images in the scene, the effect on updating a scene model are correspondingly great. For instance, with typical parameter settings a large part of a scene, due to said rapid lighting changes, will likely be determined to be foreground for several minutes, causing any software that uses the output of the scene model to behave in an erroneous manner.
One method to improve the stability of scene models is to adjust the luminance level of the input image. However, in general luminance compensation techniques do not help to improve the stability of a scene model in a rapid lighting change situation. This is because luminance compensation only helps when there is gradual lighting change in the scene.
In another method, heuristic rules are employed in which, if the total percentage of detected foreground pixels in the scene is greater than a specified threshold value, the whole scene is temporarily treated as background, or in other words, no objects in the scene are classified as foreground objects. This approach however makes no distinction between rapid global lightings and a real large foreground object standing in front of the camera which is capturing the scene.
Thus, a need exists for an improved method for foreground background (FG/BG) separation using a scene model.